package com.example.springbootdemo.controller;

import com.example.springbootdemo.entity.TreeData;
import com.example.springbootdemo.mapper.TreeMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @ClassName: TreeDataController
 * @Description:
 * @Author: TXW
 * @Date: 2024-02-27
 */

@RestController
@RequestMapping("/tree")
public class TreeDataController {
    @Resource
    private TreeMapper treeMapper;

    @GetMapping("data")
    private List<TreeData> selected(){
        return  treeMapper.getTreeData();
    }
}
